force dehydratation of lnk files when vfs metadata are wrong
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 3 Jan 2025 14:32:38 +0000 (15:32 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 3 Jan 2025 16:14:28 +0000 (17:14 +0100)
Close #7696

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/discovery.cpp

index 927a248da67b0991b926bcd409f1ba8e9668fd24..833e3ffa01774d2c935c74a698613732bfe972a5 100644 (file)
@@ -1672,7 +1672,8 @@ void ProcessDirectoryJob::processFileFinalize(
     if (_discoveryData->_syncOptions._vfs &&
         (item->_type == CSyncEnums::ItemTypeFile || item->_type == CSyncEnums::ItemTypeDirectory) &&
         item->_instruction == CSyncEnums::CSYNC_INSTRUCTION_NONE &&
-        FileSystem::isLnkFile((_discoveryData->_localDir + path._local))) {
+        FileSystem::isLnkFile((_discoveryData->_localDir + path._local)) &&
+        !_discoveryData->_syncOptions._vfs->isPlaceHolderInSync(_discoveryData->_localDir + path._local)) {
         item->_instruction = CSyncEnums::CSYNC_INSTRUCTION_SYNC;
         item->_direction = SyncFileItem::Down;
         item->_type = CSyncEnums::ItemTypeVirtualFileDehydration;